-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: workspace shifts when deleting a block #8666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome! It looks like this is your first pull request in Blockly, so here are a couple of tips:
- You can find tips about contributing to Blockly and how to validate your changes on our developer site.
- All contributors must sign the Google Contributor License Agreement (CLA). If the google-cla bot leaves a comment on this PR, make sure you follow the instructions.
- We use conventional commits to make versioning the package easier. Make sure your commit message is in the proper format or learn how to fix it.
- If any of the other checks on this PR fail, you can click on them to learn why. It might be that your change caused a test failure, or that you need to double-check the style guide.
Thank you for opening this PR! A member of the Blockly team will review it soon.
Hi, thank you for your interest and resolving this issue and for putting together this PR! While I see from your videos it stops the workspace movement, I think the original call to |
Hello! I have been debugging this issue and it indeed looks like a race condition. The reason for this is because Marking |
After the latest changes, here is how it looks like: |
Ah, this looks pretty in line with what I suspected, thank you for digging into it! Would you mind adjusting it to use |
@gonfunko done. Now the method is no longer async and we have a reusable method that can be executed both sync/async. |
Looks good! Thanks for taking care of this and working through the back and forth, I and the rest of the Blockly team appreciate it! |
The basics
The details
Resolves
Workspace shifts when deleting a block
Proposed Changes
Instead of resizing the workspace everytime a drag is finished, resizes when a block is deleted.
Reason for Changes
To fix issue #8655.
Test Coverage
Before changes:
before_changes.webm
After changes:
after_changes.webm